package com.design.structure.adapter.atguigu.classadapter;

/**
 * @ProjectName: design
 * @Package: com.design.structure.adapter.atguigu.classadapter
 * @ClassName: VoltageAdapter
 * @Author: shenaiguo
 * @Description: 适配器类
 * @Date: 2020/8/31 0031 23:00
 */
//步骤3
public class VoltageAdapter extends Voltage220V implements  IVoltage5V {
    @Override
    public int output5V() {

//获取到 220V 电压
        int srcV = output220V();
        int dstV = srcV / 44 ;
        //转成 5v
        return dstV;
    }
}
